<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use App\Models\VariantAttribute;

/**
 * VariantAttributeSeeder - 未使用的Seeder
 * 
 * 注意：此Seeder实际未被DatabaseSeeder调用，因为ProductVariantSeeder
 * 会在创建产品时直接创建VariantAttribute记录。
 * 
 * 保留此文件以备将来可能的重构或独立使用场景。
 */
class VariantAttributeSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $attributes = [
            [
                'name' => '颜色',
                'slug' => 'color',
                'type' => 'color',
                'options' => ['深空黑色', '银色', '金色', '午夜色', '星光色'],
                'is_required' => true,
                'is_variant' => true,
                'sort_order' => 100,
            ],
            [
                'name' => '存储容量',
                'slug' => 'storage',
                'type' => 'select',
                'options' => ['128GB', '256GB', '512GB', '1TB', '2TB'],
                'is_required' => true,
                'is_variant' => true,
                'sort_order' => 90,
            ],
            [
                'name' => '内存',
                'slug' => 'memory',
                'type' => 'select',
                'options' => ['8GB', '16GB', '32GB', '64GB'],
                'is_required' => false,
                'is_variant' => true,
                'sort_order' => 80,
            ],
            [
                'name' => '尺寸',
                'slug' => 'size',
                'type' => 'size',
                'options' => ['13英寸', '14英寸', '15英寸', '16英寸'],
                'is_required' => true,
                'is_variant' => true,
                'sort_order' => 70,
            ],
            [
                'name' => '连接方式',
                'slug' => 'connectivity',
                'type' => 'select',
                'options' => ['Wi-Fi', 'Wi-Fi + 蜂窝网络'],
                'is_required' => false,
                'is_variant' => true,
                'sort_order' => 60,
            ],
        ];

        foreach ($attributes as $attribute) {
            VariantAttribute::create($attribute);
        }
    }
}
